//
//  UserInfoManager.m
//  LoaginAndRegist
//
//  Created by lanou3g on 16/4/25.
//  Copyright © 2016年 liman. All rights reserved.
//

#import "UserInfoManager.h"

@implementation UserInfoManager

+ (instancetype)shareManager{
    static UserInfoManager *manager = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
            manager = [[UserInfoManager alloc]init];
    });
    return manager;
}

-(void)loginWithUserDict:(NSDictionary *)dict{
    if (dict) {
        [self setValuesForKeysWithDictionary:dict];
    }
}


-(void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
//    存储本地
    [[NSUserDefaults standardUserDefaults]setObject:value forKey:key];
    
    [[NSUserDefaults standardUserDefaults]synchronize];
    
    
}
@end
